package com.sgcc.ln.pmos.e_ln_home.bean;

import android.graphics.Color;
import android.text.TextUtils;

import com.github.mikephil.charting.components.YAxis;
import com.github.mikephil.charting.data.BarData;
import com.github.mikephil.charting.data.BarDataSet;
import com.github.mikephil.charting.data.BarEntry;
import com.github.mikephil.charting.data.BarLineScatterCandleBubbleData;
import com.github.mikephil.charting.data.CombinedData;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.data.LineData;
import com.github.mikephil.charting.data.LineDataSet;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class MarketSituationBean {

    //市场价格趋势
//    零售均价
    private float[] retailList = new float[]{
            325.133f, 351.456f, 392.106f, 370.911f, 360.342f, 353.238f, 396.754f, 392.838f
            , 378.330f, 381.146f, 395.894f, 392.982f};


    //    批发均价
    private float[] wholesaleList = new float[]{
            342.176f, 344.364f, 357.085f, 333.962f, 332.053f, 323.827f, 353.822f, 359.178f
            , 349.350f, 370.991f, 382.513f, 380.523f};

    private float[] retailList6 = new float[]{396.754f, 392.838f
            , 378.330f, 381.146f, 395.894f, 392.982f};


    //    批发均价
    private float[] wholesaleList6 = new float[]{353.822f, 359.178f
            , 349.350f, 370.991f, 382.513f, 380.523f};

    // 日滚动交易每日成交均价按日历加权平均值
    private String dayClearingAvgPrice = "[{\"month\":\"2021-07\",\"list\":[308.311051690916,306.593254865309,310.849394561367,311.361243732894,311.10279334636,325.640351540052,359.209420857942,367.190120272583,368.232857735345,334.710524184274,327.56610832854,304.646324817024,299.844713808922,303.071514957043,309.638742769844,333.952115516843,408.31230357127,528.207422505729,565.255129602839,570.550300940621,568.661997272378,525.862433578772,375.537145147671,330.226580539339]},\n" +
            "{\"month\":\"2021-08\",\"list\":[356.980081071825,352.976163005484,349.079305403522,346.353586337306,347.637278808284,362.878331236684,390.191788461852,394.732990082371,380.991187546318,362.241263060934,350.0008464631,332.404615759062,326.770262043228,327.744228643011,335.413093967885,355.49101846106,438.22718101337,615.730263746593,626.28018785934,622.832410184723,615.552008651403,576.096435213646,422.276259179441,372.531089104187]},\n" +
            "{\"month\":\"2021-09\",\"list\":[401.634565452498,394.555616535821,393.544057105483,393.410755156176,394.111509554495,433.62677373396,465.314255837857,456.242239204727,457.43677819324,409.894472036333,356.918508756889,291.381087987289,273.207833144822,278.488521828314,296.28493028926,384.995802421214,484.995877800568,656.764970064757,667.25459405101,667.024992340779,664.380323873087,647.419862365306,479.394433628613,413.130114900108]},\n" +
            "{\"month\":\"2021-10\",\"list\":[456.647137691975,452.554217625712,450.203493154816,448.042494780298,450.337826185102,471.886468231444,510.332490411078,513.930105898838,506.019341392189,472.999212437039,421.944363353658,334.532966885622,292.593866157087,298.615722423614,349.051398081771,440.289116781526,534.920431713903,614.144381779079,614.881276245673,613.364941370078,612.724385556932,605.939361171995,511.181211498676,478.475389728039]},\n" +
            "{\"month\":\"2021-11\",\"list\":[226.978573323663,224.810445861211,221.27617803359,217.959327482953,223.90250778254,241.940801591674,278.716942822157,299.212808317472,285.293326421895,251.194955115855,205.190578073449,145.517851944855,135.337181508437,139.068900840543,160.44663500797,238.89282739926,346.691693002147,485.572910587451,488.926885872557,473.583364519137,445.637482130903,388.658766483268,283.62613797837,254.672083193205]},\n" +
            "{\"month\":\"2021-12\",\"list\":[222.634981497829,222.334256964712,217.893305007912,223.309685731512,223.219427134115,245.893248118331,305.669545795022,362.94601725001,375.723820454655,339.122868609806,232.685440633315,161.259699042906,151.843489020666,154.621528457407,173.49066664455,357.08670939392,453.458393881741,570.009710598149,546.853546146537,512.701420788183,480.805239483783,370.458439130491,313.013733822213,246.417022549572]},\n" +
            "{\"month\":\"2022-01\",\"list\":[263.296244009427,262.674401675378,259.049860191882,259.677301331093,259.942905689414,271.016119413638,336.595050974714,380.479633787416,417.494402858782,368.892537309462,327.215471698169,193.526173376767,175.080399022294,179.677162171959,218.638417419964,329.971919031058,498.964617769215,629.815916922633,644.925834545082,562.58568204574,512.141715349013,439.240506053206,355.128690841821,292.323563309677]},\n" +
            "{\"month\":\"2022-02\",\"list\":[277.3198096917,275.397500812613,263.883059819289,263.065946065056,264.572011917931,275.915509606415,341.860914346592,393.916823229298,397.53029721302,306.102960902581,213.293020360046,139.892273389889,125.853442156678,126.014381345794,145.904538807657,207.962454530321,366.642945866288,573.571180766385,674.277160743864,660.910095914352,619.648980492298,487.402097234332,363.064813681152,310.712500140218]},\n" +
            "{\"month\":\"2022-03\",\"list\":[260.421656971254,257.767125403991,255.759572525593,255.331263682215,259.6439057543,274.981632822363,295.254174423359,328.314776032953,308.747569458578,219.699171421699,169.918830754297,142.90731565708,127.057672596277,130.349010380672,153.210156585042,184.024585934024,300.98734832944,450.788543198996,507.9488671514,493.872294769284,444.176059612051,383.75088439674,312.490238786698,286.102034928246]},\n" +
            "{\"month\":\"2022-04\",\"list\":[340.48712383303,337.055721761809,334.811065792838,333.310807838988,333.504835521421,347.878103981173,381.182510059055,366.932926277508,340.543673068554,329.426987180119,246.949847276614,174.106285870325,143.982514502208,142.963448777859,165.839277831381,239.398658925221,365.528380902839,456.100340363794,530.719405604749,539.604675529234,500.364628217526,471.693153480552,397.271301115256,365.583155821665]},\n" +
            "{\"month\":\"2022-05\",\"list\":[346.092420904488,342.734959831528,339.790899940665,338.563003274775,337.049645452937,346.430554153507,364.605940482027,359.596703245658,329.833658442649,285.608644308,238.548542750019,192.448197250431,165.278024690053,165.25873957807,185.568000030107,244.120655045883,342.986176133552,440.301169674372,522.001426431422,542.707592137752,516.421952729372,474.51314447801,379.852906261371,363.527724281336]},\n" +
            "{\"month\":\"2022-06\",\"list\":[373.915282831608,370.471740320276,367.482252623335,366.17258097741,368.606338992587,379.434997654937,391.361200968361,400.609361360739,395.513950245143,375.931635557768,292.38754338749,264.479602497697,229.454368596063,231.405837988155,265.254506576421,305.426552455742,437.902770662543,531.440899677477,608.819627535638,663.074438950297,654.456742387162,583.352557755236,423.5617696769,382.632896555212]},\n" +
            "{\"month\":\"2022-07\",\"list\":[354.557212040239,348.369240913089,346.102703100235,339.122723348749,340.510159854937,356.170990860283,391.585798990084,378.860466403225,374.184133123773,354.134058013481,336.493820633145,323.753506167267,310.605752260045,314.948882956049,336.592418823601,354.681847531568,456.66723434074,547.814951533674,633.083407528792,644.985273998228,660.245014127241,609.763051044754,413.564889699982,380.495008530737]},\n" +
            "{\"month\":\"2022-08\",\"list\":[421.12569238752,418.328055449148,413.276697162947,413.096531746193,416.656871302214,430.807396595833,480.446425362254,485.08260637425,443.715294520526,434.898167891144,399.17936789029,389.882372634945,372.251690381972,372.593891310098,391.116412683715,420.915883627906,517.520255037803,551.789732353701,600.111322001362,601.308570825349,583.821669472875,571.78683172861,443.223207829786,425.305977385879]}]";


    //价差浮动项趋势 6个月
    private float[] lineChart56 = new float[]{6.21f, 9.92f, 10.46f, 13.29f, 12.42f, 0f,};
    //价差浮动项趋势 12个月
    private float[] lineChart512 = new float[]{0f, 0f, 0f, 0f, 15.89f, 13.32f, 6.21f, 9.92f, 10.46f, 13.29f, 12.42f, 0f,};


    private static int lineColor1 = Color.parseColor("#FF0092FF");//蓝色
    private static int lineColor2 = Color.parseColor("#FF2BC98E");//绿色
    private static int lineColor3 = Color.parseColor("#FFAA84F4");//紫色

    private static int circleColor = Color.WHITE;

    private static float lineWidth = 1.5f;
    private static float circleRadius = 3f;
    private static float circleHoleRadius = 2f;
    public ArrayList<Entry> chart2LineDataList;
    public ArrayList<BarEntry> chart2BarDataList;


    public static class BackBean {
        public BarLineScatterCandleBubbleData data;

        private List<List<String>> dataList;

        private int index;

        public BackBean(BarLineScatterCandleBubbleData data, List<List<String>> dataList, int index) {
            this.data = data;
            this.dataList = dataList;
            this.index = index;
        }

        public BarLineScatterCandleBubbleData getData() {
            return data;
        }

        public List<List<String>> getDataList() {
            return dataList;
        }

        public int getIndex() {
            return index;
        }
    }


    //市场价格趋势 数据
    public static BackBean getChart1LineData(List<String> data, List<String> data1) {


        List<List<String>> list = new ArrayList<>();

        List<String> list1 = new ArrayList<>();
        List<String> list2 = new ArrayList<>();


        ArrayList<Entry> values1 = new ArrayList<>();

        for (int i = 0; i < data.size(); i++) {
            float v;
            if (TextUtils.isEmpty(data.get(i))) {
                v = 0f;
            } else {
                v = Float.parseFloat(data.get(i));
            }
            values1.add(new Entry(i, v));
            list1.add(v + "");
        }

        ArrayList<Entry> values2 = new ArrayList<>();

        for (int i = 0; i < data1.size(); i++) {
            float v;
            if (TextUtils.isEmpty(data1.get(i))) {
                v = 0f;
            } else {
                v = Float.parseFloat(data1.get(i));
            }
            values2.add(new Entry(i, v));
            list2.add(v + "");
        }

        // create a dataset and give it a type
        LineDataSet set1 = new LineDataSet(values1, "");

        set1.setAxisDependency(YAxis.AxisDependency.LEFT);
        set1.setColor(lineColor1);
        set1.setCircleColor(lineColor1);
        set1.setLineWidth(lineWidth);
        set1.setCircleRadius(circleRadius);
        set1.setCircleHoleRadius(circleHoleRadius);
        set1.setDrawCircleHole(true);
        set1.setDrawValues(false);

        // create a dataset and give it a type
        LineDataSet set2 = new LineDataSet(values2, "");
        set2.setAxisDependency(YAxis.AxisDependency.LEFT);
        set2.setColor(lineColor2);
        set2.setCircleColor(lineColor2);
        set2.setLineWidth(lineWidth);
        set2.setCircleRadius(circleRadius);
        set2.setCircleHoleRadius(circleHoleRadius);
        set2.setDrawCircleHole(true);
        set2.setDrawValues(false);

        // create a data object with the data sets
        LineData lineData = new LineData(set1, set2);
//        LineData lineData = new LineData(set1);

        list.add(list1);
        list.add(list2);

        return new BackBean(lineData, list, 0);
    }


    //批发市场出清行情

    public BackBean getChart2Data() {

        List<List<String>> list = new ArrayList<>();

        List<String> list1 = new ArrayList<>();
        List<String> list2 = new ArrayList<>();

        LineData lineData = new LineData();

        chart2LineDataList = new ArrayList<>();

        for (int index = 0; index < 3; index++) {
            float random = getRandom(300, 500);
            chart2LineDataList.add(new Entry(index, random));
            list2.add(random + "");

        }

        LineDataSet set = new LineDataSet(chart2LineDataList, "");
        set.setColor(Color.parseColor("#FFFEB004"));
        set.setLineWidth(lineWidth);
        set.setCircleColor(Color.parseColor("#FFFEB004"));
        set.setCircleRadius(circleRadius);
        set.setCircleHoleRadius(circleHoleRadius);
        set.setDrawCircleHole(true);
        set.setAxisDependency(YAxis.AxisDependency.RIGHT);
        set.setDrawValues(false);
        lineData.addDataSet(set);


        chart2BarDataList = new ArrayList<>();
        for (int index = 0; index < 3; index++) {
            float random = getRandom(20000, 80000);
            chart2BarDataList.add(new BarEntry(index, random));
            list1.add(random + "");
        }
        BarDataSet set1 = new BarDataSet(chart2BarDataList, "");
        set1.setAxisDependency(YAxis.AxisDependency.LEFT);
        set1.setDrawValues(false);
        set1.setGradientColor(Color.parseColor("#FF0092FF"), Color.parseColor("#FF66BDFF"));
        set1.setHighlightEnabled(false);
        BarData barData = new BarData();
        barData.addDataSet(set1);
        barData.setBarWidth(0.5f);


        list.add(list1);
        list.add(list2);


        CombinedData combinedData = new CombinedData();
        combinedData.setData(lineData);
        combinedData.setData(barData);


        return new BackBean(combinedData, list, 1);


    }


    public List<List<Data>> getChart2List() {
        List<List<Data>> chart2List = new ArrayList<>();

        List<Data> dataList1 = new ArrayList<>();
        dataList1.add(new Data("类型", "电量（MWh）", "电价（元/MWh）"));
        dataList1.add(new Data("中长期市场量价信息", "", ""));
        dataList1.add(new Data("现货市场日前量价信息", "", ""));
        dataList1.add(new Data("现货市场实时量价信息", "", ""));
        dataList1.add(new Data("市场运营费用-用户侧承担", "--", "21.22"));


        List<Data> dataList2 = new ArrayList<>();
        dataList2.add(new Data("类型", "电量（MWh）", "电价（元/MWh）"));
        dataList2.add(new Data("中长期市场量价信息", "", ""));
        dataList2.add(new Data("现货市场日前量价信息", "", ""));
        dataList2.add(new Data("现货市场实时量价信息", "", ""));
        dataList2.add(new Data("市场运营费用-用户侧承担", "--", "21.2"));


        List<Data> dataList3 = new ArrayList<>();
        dataList3.add(new Data("类型", "电量（MWh）", "电价（元/MWh）"));
        dataList3.add(new Data("中长期市场量价信息", "", ""));
        dataList3.add(new Data("现货市场日前量价信息", "", ""));
        dataList3.add(new Data("现货市场实时量价信息", "", ""));
        dataList3.add(new Data("市场运营费用-用户侧承担", "--", "9.43"));


        List<Data> dataList4 = new ArrayList<>();
        dataList4.add(new Data("类型", "电量（MWh）", "电价（元/MWh）"));
        dataList4.add(new Data("中长期市场量价信息", "", ""));
        dataList4.add(new Data("现货市场日前量价信息", "", ""));
        dataList4.add(new Data("现货市场实时量价信息", "", ""));
        dataList4.add(new Data("市场运营费用-用户侧承担", "--", "11.13"));


        List<Data> dataList5 = new ArrayList<>();
        dataList5.add(new Data("类型", "电量（MWh）", "电价（元/MWh）"));
        dataList5.add(new Data("中长期市场量价信息", "", ""));
        dataList5.add(new Data("现货市场日前量价信息", "", ""));
        dataList5.add(new Data("现货市场实时量价信息", "", ""));
        dataList5.add(new Data("市场运营费用-用户侧承担", "--", "12.29"));

        List<Data> dataList6 = new ArrayList<>();
        dataList6.add(new Data("类型", "电量（MWh）", "电价（元/MWh）"));
        dataList6.add(new Data("中长期市场量价信息", "", ""));
        dataList6.add(new Data("现货市场日前量价信息", "", ""));
        dataList6.add(new Data("现货市场实时量价信息", "", ""));
        dataList6.add(new Data("市场运营费用-用户侧承担", "--", "17.76"));

        List<Data> dataList7 = new ArrayList<>();
        dataList7.add(new Data("类型", "电量（MWh）", "电价（元/MWh）"));
        dataList7.add(new Data("中长期市场量价信息", "", ""));
        dataList7.add(new Data("现货市场日前量价信息", "", ""));
        dataList7.add(new Data("现货市场实时量价信息", "", ""));
        dataList7.add(new Data("市场运营费用-用户侧承担", "--", "19.72"));


        chart2List.add(dataList1);
        chart2List.add(dataList2);
        chart2List.add(dataList3);
        chart2List.add(dataList4);
        chart2List.add(dataList5);
        chart2List.add(dataList6);
        chart2List.add(dataList7);


        return chart2List;
    }

    public static class Data {

        private String text1;
        private String text2;
        private String text3;

        public Data(String text1, String text2, String text3) {
            this.text1 = text1;
            this.text2 = text2;
            this.text3 = text3;
        }

        public String getText1() {
            return text1;
        }

        public String getText2() {
            return text2;
        }

        public String getText3() {
            return text3;
        }


        public void setText1(String text1) {
            this.text1 = text1;
        }

        public void setText2(String text2) {
            this.text2 = text2;
        }

        public void setText3(String text3) {
            this.text3 = text3;
        }
    }


    //分时价格浮动项趋势

    public static BackBean getChart3LineData(List<String> monthClearingAvgPriceList,
                                             List<String> monthAndDayClearingAvgPriceList,
                                             List<String> dayClearingAvgPriceList) {

        List<List<String>> backList = new ArrayList<>();

        List<String> backList1 = new ArrayList<>();
        List<String> backList2 = new ArrayList<>();
        List<String> backList3 = new ArrayList<>();


        ArrayList<Entry> values1 = new ArrayList<>();
        for (int i = 0; i < monthClearingAvgPriceList.size(); i++) {
            float v;
            if (TextUtils.isEmpty(monthClearingAvgPriceList.get(i))) {
                v = 0f;
            } else {
                v = Float.parseFloat(monthClearingAvgPriceList.get(i));
            }
            values1.add(new Entry(i, v));
            backList1.add(v + "");
        }


        ArrayList<Entry> values2 = new ArrayList<>();

        for (int i = 0; i < monthAndDayClearingAvgPriceList.size(); i++) {

            float v;
            if (TextUtils.isEmpty(monthAndDayClearingAvgPriceList.get(i))) {
                v = 0f;
            } else {
                v = Float.parseFloat(monthAndDayClearingAvgPriceList.get(i));
            }
            values2.add(new Entry(i, v));
            backList2.add(v + "");
        }

        ArrayList<Entry> values3 = new ArrayList<>();

        for (int i = 0; i < dayClearingAvgPriceList.size(); i++) {
            float v;
            if (TextUtils.isEmpty(dayClearingAvgPriceList.get(i))) {
                v = 0f;
            } else {
                v = Float.parseFloat(dayClearingAvgPriceList.get(i));
            }
            values3.add(new Entry(i, v));
            backList3.add(v + "");
        }


        // create a dataset and give it a type
        LineDataSet set1 = new LineDataSet(values1, "");

        set1.setAxisDependency(YAxis.AxisDependency.LEFT);
        set1.setColor(lineColor1);
        set1.setCircleColor(lineColor1);
        set1.setLineWidth(lineWidth);
        set1.setCircleRadius(circleRadius);
        set1.setCircleHoleRadius(circleHoleRadius);
        set1.setDrawCircleHole(true);
        set1.setDrawValues(false);

        // create a dataset and give it a type
        LineDataSet set2 = new LineDataSet(values2, "");
        set2.setAxisDependency(YAxis.AxisDependency.LEFT);
        set2.setColor(lineColor2);
        set2.setCircleColor(lineColor2);
        set2.setLineWidth(lineWidth);
        set2.setCircleRadius(circleRadius);
        set2.setCircleHoleRadius(circleHoleRadius);
        set2.setDrawCircleHole(true);
        set2.setDrawValues(false);
        //set2.setFillFormatter(new MyFillFormatter(900f));

        LineDataSet set3 = new LineDataSet(values3, "");
        set3.setAxisDependency(YAxis.AxisDependency.LEFT);
        set3.setColor(lineColor3);
        set3.setCircleColor(lineColor3);
        set3.setLineWidth(lineWidth);
        set3.setCircleRadius(circleRadius);
        set3.setCircleHoleRadius(circleHoleRadius);
        set3.setDrawCircleHole(true);
        set3.setDrawValues(false);

        // create a data object with the data sets
        LineData data = new LineData(set1, set2, set3);
//        LineData data = new LineData(set1, set2);
        // set data

        backList.add(backList1);
        backList.add(backList2);
        backList.add(backList3);
        return new BackBean(data, backList, 2);

    }


    /**
     * 不分时价格浮动项趋势
     *
     * @param list1 国网代购电的价格
     * @param list2 月度集中竞价各时段出清电价算术均价
     * @return
     */
    public static BackBean getChart4LineData(List<String> list1, List<String> list2) {

        List<List<String>> backList = new ArrayList<>();

        List<String> backList1 = new ArrayList<>();
        List<String> backList2 = new ArrayList<>();

        ArrayList<Entry> values1 = new ArrayList<>();

        for (int i = 0; i < list1.size(); i++) {
            float v;
            if (TextUtils.isEmpty(list1.get(i))) {
                v = 0f;
            } else {
                v = Float.parseFloat(list1.get(i));
            }

            values1.add(new Entry(i, v));
            backList1.add(v + "");
        }

        ArrayList<Entry> values2 = new ArrayList<>();

        for (int i = 0; i < list2.size(); i++) {
            float v;
            if (TextUtils.isEmpty(list2.get(i))) {
                v = 0f;
            } else {
                v = Float.parseFloat(list2.get(i));
            }
            values2.add(new Entry(i, v));
            backList2.add(v + "");
        }

        // create a dataset and give it a type
        LineDataSet set1 = new LineDataSet(values1, "");

        set1.setAxisDependency(YAxis.AxisDependency.LEFT);
        set1.setColor(lineColor1);
        set1.setCircleColor(lineColor1);
        set1.setLineWidth(lineWidth);
        set1.setCircleRadius(circleRadius);
        set1.setCircleHoleRadius(circleHoleRadius);
        set1.setDrawCircleHole(true);
        set1.setDrawValues(false);

        // create a dataset and give it a type
        LineDataSet set2 = new LineDataSet(values2, "");
        set2.setAxisDependency(YAxis.AxisDependency.LEFT);
        set2.setColor(lineColor2);
        set2.setCircleColor(lineColor2);
        set2.setLineWidth(lineWidth);
        set2.setCircleRadius(circleRadius);
        set2.setCircleHoleRadius(circleHoleRadius);
        set2.setDrawCircleHole(true);
        set2.setDrawValues(false);

        // create a data object with the data sets
        LineData lineData = new LineData(set1, set2);

        backList.add(backList1);
        backList.add(backList2);
        return new BackBean(lineData, backList, 3);
    }

    /**
     * 价差浮动项趋势
     *
     * @param type 0 6个月 1 一年
     * @return
     */
    public BackBean getChart5LineData(int type) {
        float[] data = type == 0 ? lineChart56 : lineChart512;
        List<List<String>> backList = new ArrayList<>();

        List<String> backList1 = new ArrayList<>();


        ArrayList<Entry> values1 = new ArrayList<>();

        for (int i = 0; i < data.length; i++) {
            values1.add(new Entry(i, data[i]));
            backList1.add(data[i] + "");
        }

        // create a dataset and give it a type
        LineDataSet set1 = new LineDataSet(values1, "");

        set1.setAxisDependency(YAxis.AxisDependency.LEFT);
        set1.setColor(lineColor1);
        set1.setCircleColor(lineColor1);
        set1.setLineWidth(lineWidth);
        set1.setCircleRadius(circleRadius);
        set1.setCircleHoleRadius(circleHoleRadius);
        set1.setDrawCircleHole(true);
        set1.setDrawValues(false);

        // create a data object with the data sets
        LineData lineData = new LineData(set1);

        backList.add(backList1);

        return new BackBean(lineData, backList, 4);
    }


    public String[] getChart1XAxis(int type) {
        if (type == 0)
            return new String[]{
                    "3月", "4月", "5月", "6月", "7月", "8月"};
        else
            return new String[]{
                    "9月", "10月", "11月", "12月",
                    "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月"};
    }


    public String[] getChart2XAxis() {
        return new String[]{"中长期交易", "现货日前交易", "现货实时交易"};
    }


    public static String[] getChart3XAxis() {
        return new String[]{"1", "2", "3", "4", "5", "6", "7", "8", "9",
                "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24"};
    }


    public String[] getChart5XAxis(int type) {
        if (type == 0)
            return new String[]{"03",
                    "04",
                    "05",
                    "06",
                    "07",
                    "08"};
        else
            return new String[]{
                    "09",
                    "10",
                    "11",
                    "12",
                    "01",
                    "02",
                    "03",
                    "04",
                    "05",
                    "06",
                    "07",
                    "08"};
    }


    protected float getRandom(int min, int max) {
        return (float) new Random().nextInt((max - min) + 1) + min;
    }

}
